package com.jt.common.util;

public class DataTransitionUtil {

    public static Integer objToInteger(Object obj){
        return obj==null?null:Integer.parseInt(obj.toString());
    }

    public static String objToString(Object obj) {return obj==null?null:String.valueOf(obj);}

    public static Long objToLong(Object obj){return  obj==null?null:Long.parseLong(obj.toString());}

    public static Integer strToInteger(String obj){
        return obj==null?null:Integer.parseInt(obj);
    }

    public static Long strToLong(String obj){return  obj == null?null:Long.parseLong(obj);}

    public static Integer longToInteger(Long obj){return  obj==null?null:Integer.parseInt(String.valueOf(obj));}

    public static Long integerToLong(Integer obj){return  obj==null?null:Long.parseLong(String.valueOf(obj));}

    public static Integer doubleToInteger(Double obj){return  obj==null?null:Integer.parseInt(obj.toString());}
}
